from . import __version__ as app_version

app_name = "zelin_am"
app_title = "Agile Manufacturing"
app_publisher = "yuxinyong"
app_description = "ERPNext enhancement by fisher"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "yuxinyong@163.com"
app_license = "MIT"

fixtures = [
    {
        "doctype": "Custom Field",
        "filters": [
            [
                "name",
                "in",
                (
                    "Item-min_pack_qty",
					"Payment Term-is_advance",
					"Payment Schedule-is_advance",
					"Payment Terms Template Detail-is_advance",
					"Party Account-default_advance_accounts_receivable",
					"Party Account-default_advance_accounts_payable",
					"Company-default_advance_accounts_receivable",
					"Company-default_advance_accounts_payable",
					"Warehouse-mrp_exclude",
					"Item Default-consolidate_demand_days",
					"Item Default-is_dummy_item",
					"Item Default-llc",
					"Item Default-inspection_time",
					"Item Default-lead_time_days",
					"Item Default-days",
					"Item Default-qty_multiple",
					"Item Default-max_order_qty",
					"Item Default-min_order_qty",
					"Item Default-safety_stock",
					"Item Default-qty",
					"Item Default-supply_method",
					"Item Default-ignore_existing_stock",
					"Item Default-planner",
					"Item Default-basic_info",
					"Item Default-planning",
                ),
            ]
        ],
    }
	# ,
	# {
    #     "doctype": "Property Setter",
    #     "filters": [
    #         [
    #             "name",
    #             "in",
    #             (
                    
    #             ),
    #         ]
    #     ],
    # }
]

# Includes in <head>
# ------------------

# include js, css files in header of desk.html
# app_include_css = "/assets/zelin_am/css/zelin_am.css"
# app_include_js = "/assets/zelin_am/js/zelin_am.js"

# include js, css files in header of web template
# web_include_css = "/assets/zelin_am/css/zelin_am.css"
# web_include_js = "/assets/zelin_am/js/zelin_am.js"

# include custom scss in every website theme (without file extension ".scss")
# website_theme_scss = "zelin_am/public/scss/website"

# include js, css files in header of web form
# webform_include_js = {"doctype": "public/js/doctype.js"}
# webform_include_css = {"doctype": "public/css/doctype.css"}

# include js in page
# page_js = {"page" : "public/js/file.js"}

# include js in doctype views
doctype_js = {
	"Payment Entry" : "public/js/payment_entry.js",
	"Sales Order" : "public/js/sales_order.js"
	}
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"}
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"}
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"}

# Home Pages
# ----------

# application home page (will override Website Settings)
# home_page = "login"

# website user home page (by Role)
# role_home_page = {
#	"Role": "home_page"
# }

# Generators
# ----------

# automatically create page for each record of this doctype
# website_generators = ["Web Page"]

# Installation
# ------------

# before_install = "zelin_am.install.before_install"
# after_install = "zelin_am.install.after_install"

# Desk Notifications
# ------------------
# See frappe.core.notifications.get_notification_config

# notification_config = "zelin_am.notifications.get_notification_config"

# Permissions
# -----------
# Permissions evaluated in scripted ways

# permission_query_conditions = {
# 	"Event": "frappe.desk.doctype.event.event.get_permission_query_conditions",
# }
#
# has_permission = {
# 	"Event": "frappe.desk.doctype.event.event.has_permission",
# }

# DocType Class
# ---------------
# Override standard doctype classes

override_doctype_class = {
  	"Work Order": "zelin_am.overrides.CustomWorkOrder",
	"Stock Entry": "zelin_am.overrides.CustomStockEntry",
	"Pick List": "zelin_am.overrides.CustomPickList"
}

# Document Events
# ---------------
# Hook on document methods and events

doc_events = {
	"Purchase Order":{
		"before_validate": "zelin_am.doc_event.doc_event.po_validate"
	}
	# ,
	# "Purchase Order":{
	# 	"after_insert": "zelin_am.doc_event.doc_event.sales_order_save_submit"
	# }
}

# doc_events = {
# 	"*": {
# 		"on_update": "method",
# 		"on_cancel": "method",
# 		"on_trash": "method"
#	}
# }

# Scheduled Tasks
# ---------------

scheduler_events = {
# 	"all": [
# 		"zelin_am.tasks.all"
# 	],
"daily": [
 		"zelin_am.background_jobs.delete_obsolete_mrp"
 	]
# 	"hourly": [
# 		"zelin_am.tasks.hourly"
# 	],
# 	"weekly": [
# 		"zelin_am.tasks.weekly"
# 	]
# 	"monthly": [
# 		"zelin_am.tasks.monthly"
# 	]
}

# Testing
# -------

# before_tests = "zelin_am.install.before_tests"

# Overriding Methods
# ------------------------------
#
# override_whitelisted_methods = {
# 	"frappe.desk.doctype.event.event.get_events": "zelin_am.event.get_events"
# }
#
# each overriding function accepts a `data` argument;
# generated from the base implementation of the doctype dashboard,
# along with any modifications made in other Frappe apps
# override_doctype_dashboards = {
# 	"Task": "zelin_am.task.get_dashboard_data"
# }

# exempt linked doctypes from being automatically cancelled
#
# auto_cancel_exempted_doctypes = ["Auto Repeat"]


# User Data Protection
# --------------------

# Authentication and authorization
# --------------------------------

# auth_hooks = [
# 	"zelin_am.auth.validate"
# ]

